package assignment;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2025-02-18
 * Time: 12:11
 */
public class Demo5 {
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("hello thread");
        });
        t1.start();
        try {
            Thread.sleep(1000);
            System.out.println("hello main");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
